export const state = () => ({
  baseLayer2d: [],
  // 初始位置
  initialExtent2d: null,
  // 视图是否加载
  loaded2d: false,
  // 复位
  restoration: false
});
const getters = {
  baseLayer2d: state => {
    return state.baseLayer2d;
  },
  initialExtent2d: state => {
    return state.initialExtent2d;
  },
  loaded2d: state => {
    return state.loaded2d;
  },
  // 复位
  restoration: state => {
    return state.restoration;
  }
};
const mutations = {
  setBaseLayer2d: (state, value) => {
    state.baseLayer2d = value;
  },
  setInitialExtent2d: (state, value) => {
    state.initialExtent2d = value;
  },
  setLoaded2d: (state, value) => {
    state.loaded2d = value;
  },
  setRestoration: (state, value) => {
    state.restoration = value;
  }
};

export default {
  namespaced: true,
  state,
  getters,
  // actions,
  mutations
};
